//
//  AssetListViewCell.m
//  NiuBanJin
//
//  Created by Billy on 15/10/20.
//  Copyright © 2015年 zzjr. All rights reserved.
//

#import "AssetListViewCell.h"

@interface AssetListViewCell ()

@property (nonatomic, strong) UILabel *label_reason;
@property (nonatomic, strong) UILabel *label_time;
@property (nonatomic, strong) UILabel *label_score;

@end

@implementation AssetListViewCell

#pragma mark - subviews creation

- (void) subViewsCreation {
    
    [self setBackgroundColor:[UIColor whiteColor]];
    // cell 构成: 1. 左view [a. 上label b. 下label ]   2. 右view
    
    self.label_reason = [UsefulUtil labelCreationWithFrame:CGRectMake(MULTIPLYWIDTH(30.0/2), MULTIPLYHEIGHT(16.0/2), MULTIPLYWIDTH(200.0/2), MULTIPLYHEIGHT(30.0/2)) textColor:[UsefulUtil colorWithHexString:@"#434343"] fontName:[UIFont systemFontOfSize:15.0] text:@"首次登录"];
    
    [self.contentView addSubview:self.label_reason];
    
    self.label_time = [UsefulUtil labelCreationWithFrame:CGRectMake(MULTIPLYWIDTH(30.0/2), CGRectGetMaxY(self.label_reason.frame) +MULTIPLYHEIGHT(14.0/2), MULTIPLYWIDTH(200.0/2), MULTIPLYHEIGHT(24.0/2)) textColor:[UsefulUtil colorWithHexString:@"#989898"] fontName:[UIFont systemFontOfSize:11.0] text:@"2015-09-24 15:45:23"];
    
    [self.contentView addSubview:self.label_time];
    
    self.label_score = [UsefulUtil labelCreationWithFrame:CGRectMake(SCREEN_WIDTH/2, MULTIPLYHEIGHT(20.0/2), SCREEN_WIDTH/2 - MULTIPLYWIDTH(30.0/2), MULTIPLYHEIGHT(40.0/2)) textColor:[UsefulUtil colorWithHexString:@"#989898"] fontName:[UIFont systemFontOfSize:17.0] text:@"+ 500.00"];
    [self.label_score setTextAlignment:NSTextAlignmentRight];
    
    [self.label_score setTextColor:[UsefulUtil colorWithHexString:@"#fd4747"]];
    
    [self.contentView addSubview:self.label_score];
    
    UIView *view_sep = [[UIView alloc] initWithFrame:CGRectMake(MULTIPLYWIDTH(30.0/2), MULTIPLYHEIGHT(99.0/2), SCREEN_WIDTH, MULTIPLYHEIGHT(1.0/2))];
    [view_sep setBackgroundColor:[UsefulUtil colorWithHexString:@"#989898"]];
    
    [self.contentView addSubview:view_sep];
}

- (void)layoutSubviews {
    
    [self.label_reason setText:self.assetList.assetList_reason];
    [self.label_time setText:self.assetList.assetList_time];
    [self.label_score setText:self.assetList.assetList_value];
    
}

@end
